<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box1{
            width: 900px;
            height: 50px;
            border: 1px solid black;
            margin: 100px auto;
        }
        .box2{
            margin-left: 140px;
        }
        .w1{
            background: yellow;
            margin-left: 20px;
            float: left;
            cursor: pointer;
            margin-top: 12px;
            font-size: 20px;
        }
        .w1:hover{
            background: red;
            color: black;
        }
        p{
           list-style-image: none;
            float: left;
            margin-top: 10px;
            margin-left: 20px;
        }
    </style>
</head>
<body>
<div class="box1">
    <div class="box2">
    <div class="w1">上一页</div>
    <div class="w1">1</div>
    <div class="w1">2</div>
    <div class="w1">3</div>
    <div class="w1">4</div>
    <p>...</p>
    <div class="w1">17</div>
    <div class="w1">18</div>
    <div class="w1">19</div>
    <div class="w1">20</div>
    <div class="w1">下一页</div>
    </div>
</div>
</body>
</html>